<script type="text/javascript" src="{$base_dir}modules/dept_rad/js/AJAX_XRayProcessor.js"></script>
<script type="text/javascript">
<!--
{literal}
	$(document).ready(function(){
	      // Rigister handler for serviceGroup
	      $('#radServiceGroup').change(function(){
	           loadRadServices($(this).attr('id'), 'radService');
	      });
	      
	      // Add date picker
	      addDatePickerTime("#created_dd", '#created_mm', '#created_yyyy', '#createdTime', false, false, true);
	      
	      // Generate dialog when the page loaded
	      var buttons = {};
          buttons[_('Cancel')] = function() {
              $(this).dialog('close');        
          };

          buttons[_('Create')] = function() {
              createRadiologyTicket({/literal}{$ticketId}{literal}, $(this), {/literal}'{$triggeredElement}'{literal}, false);

          };
          generalDialog('radAssignemntDiv', _("ADD X-RAY SERVICES"), null, null,{
              autoOpen: true,         
              bgiframe: true,
              resizable: false,
              modal: true,
              width: 900,
              height: 460,
              buttons: buttons
          });
	});
{/literal}
//-->
</script>
<div id="radAssignemntDiv">
<form id="radAssignmentFrm">
    <input type="hidden" id="radType" name="radType" value="{$radType}">
    <input type="hidden" id="ticketId" name="ticketId" value="{$ticketId}">
       
    <!-- Common info of an assignment -->
    {include file="/radiology/element_assignment_create_common.html"}
    
    <!-- Detail services of an assignment -->
    {include file="/radiology/element_assignment_create_details.html"}
    
</form>
</div>

